<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('storage/index')}">{:L('ADMIN_STORAGE_INDEX')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('storage/setting_post')}">
			<php>$support_storages=array("Local"=>L('DEFAULT'),"Qiniu"=>L('QINIU'));</php>
			<select name="type">
				<foreach name="support_storages" item="vo">
					<php>$type_selected=$type==$key?"selected":"";</php>
					<option value="{$key}"{$type_selected}>{$vo}</option>
				</foreach>
			</select>
			<div style="margin-top: 10px;">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#qiniu-setting" data-toggle="tab">{:L('QINIU')}</a></li>
					<li><a href="#qiniu-picture-protect" data-toggle="tab">原图保护设置</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="qiniu-setting">
						<div class="control-group">
							<label class="control-label">AccessKey</label>
							<div class="controls">
								<input type="text" name="Qiniu[accessKey]" value="{$Qiniu.accessKey}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">SecretKey</label>
							<div class="controls">
								<input type="text" name="Qiniu[secretKey]" value="{$Qiniu.secretKey}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">上传域名</label>
							<div class="controls">
								<input type="text" name="Qiniu[upHost]" value="{$Qiniu.upHost}">
								<span class="help-block">
									七牛不同存储区域上传域名不一样，根据您空间的存储区域,设置不同的域名；<br>
									华东：http://up.qiniu.com,华北：http://up-z1.qiniu.com;<br>
									默认为华东；
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">域名协议</label>
							<div class="controls">
								<select name="Qiniu[setting][protocol]">
									<option value="http">http</option>
									<eq name="Qiniu.setting.protocol" value="https">
									<option value="https" selected="selected">https</option>
									<else />
									<option value="https">https</option>
									</eq> 
									
								</select>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">{:L('DOMAIN')}</label>
							<div class="controls">
								<input type="text" name="Qiniu[domain]" value="{$Qiniu.domain}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">{:L('BUCKET')}</label>
							<div class="controls">
								<input type="text" name="Qiniu[bucket]" value="{$Qiniu.bucket}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">{:L('GET_ACCESS_KEY')}</label>
							<div class="controls">
								<a href="https://portal.qiniu.com/signup?code=3lfihpz361o42" target="_blank">{:L('GET_IT_NOW')}</a>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">{:L('QINIU_PROMOTION_CODE')}</label>
							<div class="controls">
								<a href="http://www.thinkcmf.com/topic/topic/index/id/103.html" target="_blank">507670e8</a>
								<a href="https://portal.qiniu.com/signin" target="_blank">立即充值</a>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">七牛帮助文档</label>
							<div class="controls">
								<a href="http://www.thinkcmf.com/qiniu/help.html" target="_blank">立即访问</a>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="qiniu-picture-protect">
						<div class="control-group">
							<label class="control-label">开启原图保护</label>
							<div class="controls">
								<select name="Qiniu[setting][enable_picture_protect]">
									<option value="0">关闭</option>
									<empty name="Qiniu.setting.enable_picture_protect">
									<option value="1">开启</option>
									<else />
									<option value="1" selected="selected">开启</option>
									</empty> 
									
								</select>
							</div>
						</div>
						
						<div class="control-group">
							<label class="control-label">样式分隔符</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][style_separator]" value="{$Qiniu.setting.style_separator|default='!'}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-水印</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][watermark]" value="{$Qiniu.setting.styles.watermark|default='watermark'}">
								<span class="help-block">
									请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-头像</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][avatar]" value="{$Qiniu.setting.styles.watermark|default='avatar'}">
								<span class="help-block">
									请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置
									处理接口:<br>
									imageView2/1/w/100/h/100/interlace/0/q/100
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-缩略图120x120</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][thumbnail120x120]" value="{$Qiniu.setting.styles.thumbnail120x120|default='thumbnail120x120'}">
								<span class="help-block">
								请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置<br>
								处理接口:<br>
								imageView2/1/w/120/h/120/interlace/0/q/100
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-缩略图300x300</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][thumbnail300x300]" value="{$Qiniu.setting.styles.thumbnail300x300|default='thumbnail300x300'}">
								<span class="help-block">
								请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置<br>
								处理接口:<br>
								imageView2/1/w/300/h/300/interlace/0/q/100
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-缩略图640x640</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][thumbnail640x640]" value="{$Qiniu.setting.styles.thumbnail640x640|default='thumbnail640x640'}">
								<span class="help-block">
								请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置<br>
								处理接口:<br>
								imageView2/1/w/640/h/640/interlace/0/q/100
								</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">样式-缩略图1080x1080</label>
							<div class="controls">
								<input type="text" name="Qiniu[setting][styles][thumbnail1080x1080]" value="{$Qiniu.setting.styles.thumbnail1080x1080|default='thumbnail1080x1080'}">
								<span class="help-block">
								请到七牛存储空间->图片样式：添加此样式名称，并进行相应设置<br>
								处理接口:<br>
								imageView2/1/w/1080/h/1080/interlace/0/q/100
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
